package models_main

import (
	"fmt"
	"longmen/server/pkg/db/mysql/models"
	"time"
)

type AnchorWithdrawals struct {
	Id            int       `json:"id" gorm:"primaryKey;autoIncrement"`
	Uid           int       `json:"uid"`            //int(10) DEFAULT NULL,
	Diamond       int       `json:"diamond"`        //int(10) DEFAULT NULL COMMENT '扣除钻石数量',
	Cash          float64   `json:"cash"`           //decimal(10,2) DEFAULT NULL COMMENT '提取金额',
	AlipayAccount string    `json:"alipay_account"` //varchar(255) DEFAULT NULL COMMENT '收款支付宝账号',
	AlipayName    string    `json:"alipay_name"`    //varchar(255) DEFAULT NULL COMMENT '收款人支付宝姓名',
	CreateTime    time.Time `json:"create_time"`    //datetime DEFAULT NULL COMMENT '申请提现时间',
	OperateTime   time.Time `json:"operate_time"`   //datetime DEFAULT NULL COMMENT '处理时间',
	Status        int       `json:"status"`         //int(1) DEFAULT '0' COMMENT '0-未处理 1-已提现 2-已拒绝(钻石返还) 3-异常单(扣除金币)',
	TradeNo       string    `json:"trade_no"`       //varchar(255) DEFAULT NULL COMMENT '转账订单号',
}

func (AnchorWithdrawals) TableName() string {
	return fmt.Sprintf("%sanchor_withdrawals", models.Prefix)
}
